package main

import (
	"context"
	"fmt"
)

const (
	key  = "key"
	key2 = "key2"
)

func main() {
	ctx := context.Background()
	ctx1 := context.WithValue(ctx, key, "val1")
	context.WithValue(ctx, key2, "val11")
	ctx2 := context.WithValue(ctx1, key, "val2")
	fmt.Println(ctx.Value(key))
	fmt.Println(ctx1.Value(key))
	fmt.Println(ctx2.Value(key))
}
